package com.blueheart.music.mapper;

import com.blueheart.music.model.pojo.Consumer;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.beans.Customizer;
import java.util.List;

@Mapper
@Repository
public interface ConsumerMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Consumer record);

    int insertSelective(Consumer record);

    Consumer selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Consumer record);

    int updateByPrimaryKey(Consumer record);

    /**
     * 查询全部
     * @return
     */
    List<Consumer> seleteAll();

    /**
     * 通过名字查询用户
     * @param userName
     * @return
     */
    Consumer selectByUserName(String userName);

    /**
     * 用户登录
     * @param userName
     * @param password
     * @return
     */
    Consumer selectByConsumer(String userName,String password);
}